package com.dt76.smallloanbackenduser.remote.ysy;

import com.dt76.smallloanbackenduser.hystrix.ysy.AppHystrix1;
import com.dt76.smallloanbackenduser.pojo.ysy.ApprovalLoan;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "smallloan-backend-service",fallback = AppHystrix1.class)
public interface AppRemote {

    @RequestMapping("/ysy/account2")
    public List<ApprovalLoan> qryAppAll2();

    @RequestMapping("/ysy/delapp")
    public Result delapp(@RequestParam("alId") int alId);

    @RequestMapping(value = "/ysy/addapp",method = RequestMethod.POST,consumes = "application/json")
    public Result addapp(@RequestBody ApprovalLoan approvalLoan);
}
